﻿using System;
using Brjnk.GpxExplorer.ViewModel;

namespace Brjnk.GpxExplorer.Workspace.BitmapExport
{
    public class TrackLabel : GeoObjectLabel
    {
        public TrackLabel(Page page, LabelStyle labelStyle, ArrowStyle arrowStyle, TrackLabelStyle trackLabelStyle, TrackVM track)
            : base(page, labelStyle, arrowStyle)
        {
            if ((object)trackLabelStyle == null) throw new ArgumentNullException("trackLabelStyle");
            this.TrackLabelStyle = trackLabelStyle;
            this.track = track;
            Init();
        }

        private TrackLabelStyle trackLabelStyle;

        public TrackLabelStyle TrackLabelStyle
        {
            get { return trackLabelStyle; }
            private set { trackLabelStyle = value; OnPropertyChanged("TrackLabelStyle"); }
        }

        private TrackVM track;

        public TrackVM Track
        {
            get { return track; }
        }

        public override object DataObject
        {
            get { return track; }
        }
    }
}